package com.zy.thread.bank;

/**
 * @Author Gong
 * @Description
 * @dATE 2021/12/14 10:38
 **/
public class Account implements Runnable{
    int money = 3000;
    @Override
    public void run() {

        if(money > 2000){
            System.out.println();
            money = money - 2000;

            System.out.println(Thread.currentThread().getName() + "取了2000剩余:"+money);
        }

    }
}
